const getEnvConfig = () => {
  const mode = import.meta.env.VITE_ENV_MODE || 'development'; // 环境变量
  // console.log('环境变量：', mode);

  return {
    mode,
    isDev: mode === 'development',
    isProd: mode === 'production',
    baseURL: import.meta.env.VITE_API_BASE_URL,
    xygengURL: import.meta.env.VITE_API_XYGENG_API_URL,
    yingtianURL: import.meta.env.VITE_API_YINGTIAN_API_URL,
    timeout: 30000, // 60秒超时
    withCredentials: true, // 跨域携带cookie
  };
};

export default getEnvConfig();